<?php
/**
 * Created by PhpStorm.
 * User: leo
 * Date: 2018/5/10
 * Time: 9:38
 */
include '../classes/logincheck.php';
include '../classes/conn.php';
if(islogin()=='teacher_login'){
    $query="select name from class where num='{$_POST['class_num']}' and teacher='{$_SESSION['t_num']}'";
    $res=mysql_query($query);
    if(mysql_num_rows($res)){
        while ($row=mysql_fetch_assoc($res)){
            echo $row['name'];
        }
    }
    else{
        echo "none";
    }

}